﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ArtMath.Window
{
    public partial class MessageBoxWindow : Form
    {
        public enum Result
        {
            zjzbx,
            jzbx,
            hhzbx,
            none,
        }
        public Result dialogResult;
        public MessageBoxWindow()
        {
            InitializeComponent();
        }

        void frmMBox_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (Tag == null) Tag = -1;
        }

        void cancel_Click(object sender, EventArgs e)
        {
            dialogResult = Result.none;
            Close();
        }

        void ok_Click(object sender, EventArgs e)
        {
            if (checkBox1.Checked && checkBox2.Checked)
                dialogResult = Result.hhzbx;
            else if (!checkBox1.Checked && !checkBox2.Checked)
                dialogResult = Result.none;
            else
                dialogResult = checkBox1.Checked ? Result.zjzbx : Result.jzbx;
            Close();
        }
    }
}
